<!-- 也可以使用 $_SERVER['PHP_SELF'] 取代 $current_page -->
<?php

require_once '../config.php';
require_once '../functions.php';
$cook = books_get_current_user();

$current_page = isset($current_page) ? $current_page : '';

?>
<div class="aside">
  <div class="profile">
    <img class="avatar" src="<?php echo $cook['avatar']?>">
    <h3 class="name"><?php echo $cook['slug']?></h3>
  </div>
  <ul class="nav">
    <li<?php echo $current_page === 'index' ? ' class="active"' : '' ?>>
      <a href="/admin/index.php"><i class="fa fa-github-square"></i>首页</a>
    </li>
    <li<?php echo $current_page === '' ? ' class="active"' : '' ?>>
      <a href="/admin/book.php"><i class="fa fa-heart-o"></i>书名</a>
    </li>
    <li<?php echo $current_page === '' ? ' class="active"' : '' ?>>
      <a href="/admin/sentence.php"><i class="fa fa-minus"></i>详情页</a>
    </li>
    <li<?php echo $current_page === '' ? ' class="active"' : '' ?>>
      <a href="/admin/substance.php"><i class="fa fa-lock"></i>内容</a>
    </li>
    <li<?php echo $current_page === 'minute' ? ' class="active"' : '' ?>>
      <a href="/admin/minute.php"><i class="fa fa-play-circle-o"></i>评论</a>
    </li>  
    <li<?php echo $current_page === '' ? ' class="active"' : '' ?>>
      <a href="/admin/option.php"><i class="fa fa-road"></i>句读</a>
    </li>
    <li<?php echo $current_page === '' ? ' class="active"' : '' ?>>
      <a href="/admin/user.php"><i class="fa fa-users"></i>个人中心</a>
    </li>
  </ul>
</div>
